@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.features {
  margin: 6rem 0 8rem;
  opacity: 0;
  animation: fade-in-up 0.8s ease-out forwards;

  &Title {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-primary);
    text-align: center;
    opacity: 0;
    animation: fade-in-up 0.8s ease-out forwards;
    animation-delay: 0.2s;
  }

  &Grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    opacity: 0;
    animation: fade-in-up 0.8s ease-out forwards;
    animation-delay: 0.4s;
  }

  &Card {
    padding: 2rem;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition:
      transform 0.3s ease,
      box-shadow 0.3s ease;
    animation: fade-in-up 0.8s ease-out forwards;
    animation-delay: calc(0.1s * var(--index, 0));

    &:hover {
      box-shadow: 0 10px 20px rgb(0 0 0 / 5%);
      transform: translateY(-5px);
    }

    h3 {
      margin: 1rem 0;
      color: var(--text-primary);
    }

    p {
      line-height: 1.6;
      color: var(--text-secondary);
    }
  }
}

@media (width <= 768px) {
  .featuresGrid {
    grid-template-columns: 1fr;
    padding: 0;
  }
}
